{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Working with Molecules from ZINC and ChEMBL\n",
    "\n",
    "Graphein provides utilities for retrieving molecules and metadata from [ZINC](https://zinc.docking.org/) and [ChEMBL](https://www.ebi.ac.uk/chembl/)\n",
    "\n",
    "The ZINC database is a curated collection of commercially available chemical compounds prepared especially for virtual screening.\n",
    "\n",
    "\n",
    "ChEMBL or ChEMBLdb is a manually curated chemical database of bioactive molecules with drug-like properties. It is maintained by the European Bioinformatics Institute, of the European Molecular Biology Laboratory\n",
    "\n",
    "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/a-r-j/graphein/blob/master/notebooks/molecules_from_zinc_and_chembl.ipynb) [![GitHub](https://img.shields.io/badge/-View%20on%20GitHub-181717?logo=github&logoColor=ffffff)](https://github.com/a-r-j/graphein/blob/master/notebooks/molecules_from_zinc_and_chembl.ipynb)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Install Graphein if necessary\n",
    "# !pip install graphein[extras]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import graphein.molecule as gm"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## ZINC\n",
    "### Mapping between SMILEs and ZINC IDs."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'C[C@H]1CCCCN1CC#CC(O)(c1ccccc1)c1ccccc1'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#NBVAL_SKIP\n",
    "gm.get_smiles_from_zinc(\"ZINC01234567\", backend=\"zinc15\") #Backend allows specification of which ZINC release to use"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can also map a SMILE string back to ZINC identifiers. \n",
    "\n",
    "N.B. we may obtain multiple ZINC IDs. In the example below, we retrieve two ZINC IDs for the two enantiomers of the specified molecule"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['ZINC000001234567', 'ZINC000001234568']"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#NBVAL_SKIP\n",
    "gm.get_zinc_id_from_smile(\"C[C@H]1CCCCN1CC#CC(O)(c1ccccc1)c1ccccc1\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Constructing Graphs\n",
    "We can also retrieve the molecular graphs directly from the ZINC ID"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAIAAADCEh9HAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3deViU1f4A8O/sw8CwSbiDC4uIguKSZoqYZJl2vRk9WWKaV8RANLdxRwGVa2m4pPJzKXkyDavbRUzNq6HmEmqIiCE4LCUurMMMMPuc3x+H5nKxRWFm3pfh+3l83kfODOd8x+XLed+zcQghgBBCqLW4TAeAEELtG6ZRhBBqE0yjCCHUJphGEUKoTfhMB4CQddXV1ZlMJoVCQQgRiUTdu3dnOiJkbzCNIlbLy8srKChobGzUarUNDQ06nY5e6+vr9Xo9vapUKoPBQK9KpdJoNNIrTaDNa5sxY8aoUaOioqKY+jjILnFwwhNird27d58/f/7IkSNtqcTZ2ZnH47m4uBBC7t+/Twi5evXqoEGDLBUkQphGEUs9ePDAx8dHrVaHh4d36dJFLBY7ODiIxWKJRCISiejV0dFRKBTSq5OTk0AgkEqlfD6fXmkCbV7nokWLPvroo2HDhl2+fLnFSwi1GqZRxFLR0dGpqakRERHp6emWqrOxsTEwMLC0tHTnzp0xMTGWqhZ1cJhGERsVFRUFBgaaTKa8vLyAgAAL1vztt9++8sor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KcUyTp3GtQIWNAI28XY1xfcyh1uUkBetoZOjvAUS7jVsmonZni2qbo20OHUjbCjEqKJYqG7E5sm9bJYjGnQuI+P2l0SErYFELbEFporGan9IRrzTloqAY5suWGwTg5HTez7trEsEWkhMqyMjZF7KOo7nHzWcYvAzqVGfAAAAAElFTkSuQmCC",
      "text/plain": [
       "<rdkit.Chem.rdchem.Mol at 0x7fb5d947a6a0>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#NBVAL_SKIP\n",
    "g = gm.construct_graph(zinc_id=\"ZINC000001234567\")\n",
    "g.graph[\"rdmol\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAIAAADCEh9HAAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3deViU1f4A8O+sDMOOuOACKpuIguCSZgqYWpl5vRk9mWKKN8TLVm7jjiIpj10Nt5SfS8mjZVg9XcTSTAO9LqGGCCqCw1Ku7MwAs8/5/XFoLhfNFGbmfWf4fh6f95Ezwznfcfly3vdsHEIIIIQQ6igu0wEghJBlwzSKEEKdgmkUIYQ6BdMoQgh1Cp/pABAyrcbGRr1e39DQQAixsbHp06cP0xEha4NpFLFaYWFhcXFxS0uLSqVqbm5Wq9X02tTUpNFo6FUul2u1WnqVyWQ6nY5eaQJtW9ucOXPGjh0bHR3N1MdBVomDE54Qa+3evfvs2bNHjhzpTCWOjo48Hs/JyYkQcv/+fULI5cuXhw0bZqwgEcI0iljqwYMH3t7eCoVi0qRJvXr1EolEtra2IpFILBbb2NjQq52dnVAopFd7e3uBQODg4MDn8+mVJtC2dS5atOiTTz4ZOXLkxYsX272EUIdhGkUsFRMTk56eHhERkZmZaaw6W1paAgICKioqdu7cGRsba6xqUReHaRSxUWlpaUBAgF6vLyws9Pf3N2LN33///euvv+7o6Hjz5k0cbkJGgUNM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
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#NBVAL_SKIP\n",
    "g = gm.construct_graph(zinc_id=\"ZINC000001234568\")\n",
    "g.graph[\"rdmol\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.plotly.v1+json": {
       "config": {
        "plotlyServerURL": "https://plot.ly"
       },
       "data": [
        {
         "hoverinfo": "text+x+y+z",
         "marker": {
          "color": [
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.610667,
            0.090204,
            0.619951,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.928329,
            0.472975,
            0.326067,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ]
          ],
          "opacity": 0.7,
          "size": [
           21,
           23,
           22,
           22,
           22,
           22,
           23,
           22,
           22,
           22,
           24,
           21,
           23,
           22,
           22,
           22,
           22,
           22,
           23,
           22,
           22,
           22,
           22,
           22
          ],
          "symbol": "circle"
         },
         "mode": "markers",
         "text": [
          "C:0",
          "C:1",
          "C:2",
          "C:3",
          "C:4",
          "C:5",
          "N:6",
          "C:7",
          "C:8",
          "C:9",
          "C:10",
          "O:11",
          "C:12",
          "C:13",
          "C:14",
          "C:15",
          "C:16",
          "C:17",
          "C:18",
          "C:19",
          "C:20",
          "C:21",
          "C:22",
          "C:23"
         ],
         "type": "scatter3d",
         "x": [
          3.3291663209728712,
          2.9339034691505397,
          4.167768349259012,
          4.5275521391320765,
          3.314977558261857,
          2.011721577367487,
          1.8484846431340283,
          0.5274665408842601,
          -0.5313123123026368,
          -1.3687101053687678,
          -2.374209650868736,
          -3.3430193488277027,
          -1.809039693413769,
          -0.4299677971218455,
          0.03840353461806333,
          -0.8589432191258308,
          -2.227803465198845,
          -2.697927445873024,
          -3.048642681196744,
          -4.383032206520997,
          -4.978112621191092,
          -4.250486683260213,
          -2.9259276815018223,
          -2.32949119012552
         ],
         "y": [
          0.8573098671858903,
          -0.5771760207963932,
          -1.375082059674077,
          -1.088482137143742,
          -1.2120009967074206,
          -1.4791498479118455,
          -0.5071943978855948,
          -0.6091627596363997,
          -0.12622897749090367,
          0.26859046890712074,
          0.7589063389883153,
          1.4868092968813476,
          1.7611749201895726,
          1.9356398849700895,
          2.851252594082364,
          3.606282203456063,
          3.4441395936801182,
          2.5297044417925165,
          -0.4387710420002049,
          -0.7922132081347328,
          -1.8910658221935528,
          -2.6603377722416206,
          -2.33455113782404,
          -1.2371620082642507
         ],
         "z": [
          3.169682266210413,
          2.7992184363582364,
          2.3294704201994616,
          0.878049510124735,
          -0.042507646584245384,
          0.7124401454370587,
          1.7979830056159192,
          2.4369402815964967,
          1.5395803157169177,
          0.7719343726074325,
          -0.20098826893975852,
          0.5705107806075407,
          -1.2247519923372914,
          -1.443243258343401,
          -2.389710726575145,
          -3.1383600465029926,
          -2.9483035119602676,
          -2.004149070305581,
          -0.886907070330595,
          -0.6160817777460404,
          -1.2415525979361168,
          -2.1456736241171206,
          -2.42459140580918,
          -1.7995485132156896
         ]
        },
        {
         "hoverinfo": "text",
         "line": {
          "color": [
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ],
           [
            0.050383,
            0.029803,
            0.527975,
            1
           ]
          ],
          "width": 10
         },
         "mode": "lines",
         "text": [
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond",
          "bond"
         ],
         "type": "scatter3d",
         "x": [
          3.3291663209728712,
          2.9339034691505397,
          null,
          2.9339034691505397,
          4.167768349259012,
          null,
          2.9339034691505397,
          1.8484846431340283,
          null,
          4.167768349259012,
          4.5275521391320765,
          null,
          4.5275521391320765,
          3.314977558261857,
          null,
          3.314977558261857,
          2.011721577367487,
          null,
          2.011721577367487,
          1.8484846431340283,
          null,
          1.8484846431340283,
          0.5274665408842601,
          null,
          0.5274665408842601,
          -0.5313123123026368,
          null,
          -0.5313123123026368,
          -1.3687101053687678,
          null,
          -1.3687101053687678,
          -2.374209650868736,
          null,
          -2.374209650868736,
          -3.3430193488277027,
          null,
          -2.374209650868736,
          -1.809039693413769,
          null,
          -2.374209650868736,
          -3.048642681196744,
          null,
          -1.809039693413769,
          -0.4299677971218455,
          null,
          -1.809039693413769,
          -2.697927445873024,
          null,
          -0.4299677971218455,
          0.03840353461806333,
          null,
          0.03840353461806333,
          -0.8589432191258308,
          null,
          -0.8589432191258308,
          -2.227803465198845,
          null,
          -2.227803465198845,
          -2.697927445873024,
          null,
          -3.048642681196744,
          -4.383032206520997,
          null,
          -3.048642681196744,
          -2.32949119012552,
          null,
          -4.383032206520997,
          -4.978112621191092,
          null,
          -4.978112621191092,
          -4.250486683260213,
          null,
          -4.250486683260213,
          -2.9259276815018223,
          null,
          -2.9259276815018223,
          -2.32949119012552,
          null
         ],
         "y": [
          0.8573098671858903,
          -0.5771760207963932,
          null,
          -0.5771760207963932,
          -1.375082059674077,
          null,
          -0.5771760207963932,
          -0.5071943978855948,
          null,
          -1.375082059674077,
          -1.088482137143742,
          null,
          -1.088482137143742,
          -1.2120009967074206,
          null,
          -1.2120009967074206,
          -1.4791498479118455,
          null,
          -1.4791498479118455,
          -0.5071943978855948,
          null,
          -0.5071943978855948,
          -0.6091627596363997,
          null,
          -0.6091627596363997,
          -0.12622897749090367,
          null,
          -0.12622897749090367,
          0.26859046890712074,
          null,
          0.26859046890712074,
          0.7589063389883153,
          null,
          0.7589063389883153,
          1.4868092968813476,
          null,
          0.7589063389883153,
          1.7611749201895726,
          null,
          0.7589063389883153,
          -0.4387710420002049,
          null,
          1.7611749201895726,
          1.9356398849700895,
          null,
          1.7611749201895726,
          2.5297044417925165,
          null,
          1.9356398849700895,
          2.851252594082364,
          null,
          2.851252594082364,
          3.606282203456063,
          null,
          3.606282203456063,
          3.4441395936801182,
          null,
          3.4441395936801182,
          2.5297044417925165,
          null,
          -0.4387710420002049,
          -0.7922132081347328,
          null,
          -0.4387710420002049,
          -1.2371620082642507,
          null,
          -0.7922132081347328,
          -1.8910658221935528,
          null,
          -1.8910658221935528,
          -2.6603377722416206,
          null,
          -2.6603377722416206,
          -2.33455113782404,
          null,
          -2.33455113782404,
          -1.2371620082642507,
          null
         ],
         "z": [
          3.169682266210413,
          2.7992184363582364,
          null,
          2.7992184363582364,
          2.3294704201994616,
          null,
          2.7992184363582364,
          1.7979830056159192,
          null,
          2.3294704201994616,
          0.878049510124735,
          null,
          0.878049510124735,
          -0.042507646584245384,
          null,
          -0.042507646584245384,
          0.7124401454370587,
          null,
          0.7124401454370587,
          1.7979830056159192,
          null,
          1.7979830056159192,
          2.4369402815964967,
          null,
          2.4369402815964967,
          1.5395803157169177,
          null,
          1.5395803157169177,
          0.7719343726074325,
          null,
          0.7719343726074325,
          -0.20098826893975852,
          null,
          -0.20098826893975852,
          0.5705107806075407,
          null,
          -0.20098826893975852,
          -1.2247519923372914,
          null,
          -0.20098826893975852,
          -0.886907070330595,
          null,
          -1.2247519923372914,
          -1.443243258343401,
          null,
          -1.2247519923372914,
          -2.004149070305581,
          null,
          -1.443243258343401,
          -2.389710726575145,
          null,
          -2.389710726575145,
          -3.1383600465029926,
          null,
          -3.1383600465029926,
          -2.9483035119602676,
          null,
          -2.9483035119602676,
          -2.004149070305581,
          null,
          -0.886907070330595,
          -0.6160817777460404,
          null,
          -0.886907070330595,
          -1.7995485132156896,
          null,
          -0.6160817777460404,
          -1.2415525979361168,
          null,
          -1.2415525979361168,
          -2.1456736241171206,
          null,
          -2.1456736241171206,
          -2.42459140580918,
          null,
          -2.42459140580918,
          -1.7995485132156896,
          null
         ]
        }
       ],
       "layout": {
        "height": 650,
        "margin": {
         "t": 100
        },
        "scene": {
         "xaxis": {
          "showbackground": false,
          "showgrid": false,
          "showline": false,
          "showticklabels": false,
          "title": {
           "text": ""
          },
          "zeroline": false
         },
         "yaxis": {
          "showbackground": false,
          "showgrid": false,
          "showline": false,
          "showticklabels": false,
          "title": {
           "text": ""
          },
          "zeroline": false
         },
         "zaxis": {
          "showbackground": false,
          "showgrid": false,
          "showline": false,
          "showticklabels": false,
          "title": {
           "text": ""
          },
          "zeroline": false
         }
        },
        "showlegend": false,
        "template": {
         "data": {
          "bar": [
           {
            "error_x": {
             "color": "#2a3f5f"
            },
            "error_y": {
             "color": "#2a3f5f"
            },
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             },
             "pattern": {
              "fillmode": "overlay",
              "size": 10,
              "solidity": 0.2
             }
            },
            "type": "bar"
           }
          ],
          "barpolar": [
           {
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             },
             "pattern": {
              "fillmode": "overlay",
              "size": 10,
              "solidity": 0.2
             }
            },
            "type": "barpolar"
           }
          ],
          "carpet": [
           {
            "aaxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "baxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "type": "carpet"
           }
          ],
          "choropleth": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "choropleth"
           }
          ],
          "contour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "contour"
           }
          ],
          "contourcarpet": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "contourcarpet"
           }
          ],
          "heatmap": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmap"
           }
          ],
          "heatmapgl": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmapgl"
           }
          ],
          "histogram": [
           {
            "marker": {
             "pattern": {
              "fillmode": "overlay",
              "size": 10,
              "solidity": 0.2
             }
            },
            "type": "histogram"
           }
          ],
          "histogram2d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2d"
           }
          ],
          "histogram2dcontour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2dcontour"
           }
          ],
          "mesh3d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "mesh3d"
           }
          ],
          "parcoords": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "parcoords"
           }
          ],
          "pie": [
           {
            "automargin": true,
            "type": "pie"
           }
          ],
          "scatter": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter"
           }
          ],
          "scatter3d": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter3d"
           }
          ],
          "scattercarpet": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattercarpet"
           }
          ],
          "scattergeo": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergeo"
           }
          ],
          "scattergl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergl"
           }
          ],
          "scattermapbox": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattermapbox"
           }
          ],
          "scatterpolar": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolar"
           }
          ],
          "scatterpolargl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolargl"
           }
          ],
          "scatterternary": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterternary"
           }
          ],
          "surface": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "surface"
           }
          ],
          "table": [
           {
            "cells": {
             "fill": {
              "color": "#EBF0F8"
             },
             "line": {
              "color": "white"
             }
            },
            "header": {
             "fill": {
              "color": "#C8D4E3"
             },
             "line": {
              "color": "white"
             }
            },
            "type": "table"
           }
          ]
         },
         "layout": {
          "annotationdefaults": {
           "arrowcolor": "#2a3f5f",
           "arrowhead": 0,
           "arrowwidth": 1
          },
          "autotypenumbers": "strict",
          "coloraxis": {
           "colorbar": {
            "outlinewidth": 0,
            "ticks": ""
           }
          },
          "colorscale": {
           "diverging": [
            [
             0,
             "#8e0152"
            ],
            [
             0.1,
             "#c51b7d"
            ],
            [
             0.2,
             "#de77ae"
            ],
            [
             0.3,
             "#f1b6da"
            ],
            [
             0.4,
             "#fde0ef"
            ],
            [
             0.5,
             "#f7f7f7"
            ],
            [
             0.6,
             "#e6f5d0"
            ],
            [
             0.7,
             "#b8e186"
            ],
            [
             0.8,
             "#7fbc41"
            ],
            [
             0.9,
             "#4d9221"
            ],
            [
             1,
             "#276419"
            ]
           ],
           "sequential": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ],
           "sequentialminus": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ]
          },
          "colorway": [
           "#636efa",
           "#EF553B",
           "#00cc96",
           "#ab63fa",
           "#FFA15A",
           "#19d3f3",
           "#FF6692",
           "#B6E880",
           "#FF97FF",
           "#FECB52"
          ],
          "font": {
           "color": "#2a3f5f"
          },
          "geo": {
           "bgcolor": "white",
           "lakecolor": "white",
           "landcolor": "#E5ECF6",
           "showlakes": true,
           "showland": true,
           "subunitcolor": "white"
          },
          "hoverlabel": {
           "align": "left"
          },
          "hovermode": "closest",
          "mapbox": {
           "style": "light"
          },
          "paper_bgcolor": "white",
          "plot_bgcolor": "#E5ECF6",
          "polar": {
           "angularaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "radialaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "scene": {
           "xaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "yaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "zaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           }
          },
          "shapedefaults": {
           "line": {
            "color": "#2a3f5f"
           }
          },
          "ternary": {
           "aaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "baxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "caxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "title": {
           "x": 0.05
          },
          "xaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          },
          "yaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          }
         }
        },
        "width": 620
       }
      }
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#NBVAL_SKIP\n",
    "# Here we retrieve the above molecule, generate a 3D conformer and visualise it\n",
    "config = gm.MoleculeGraphConfig(edge_construction_functions=[gm.add_atom_bonds])\n",
    "\n",
    "g = gm.construct_graph(zinc_id=\"ZINC000001234568\", generate_conformer=True, config=config)\n",
    "gm.plotly_molecular_graph(g)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## ChEMBL\n",
    "\n",
    "Similarly, we can map between ChEMBL identifiers and SMILEs. We can also add ChEMBLs rich metadata to the graph"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "'CC(=O)N(O)CCCCCNC(=O)CCC(=O)N(O)CCCCCNC(=O)CCC(=O)N(O)CCCCCN.CS(=O)(=O)O'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#NBVAL_SKIP\n",
    "gm.get_smiles_from_chembl(\"CHEMBL1234\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "'CHEMBL1234'"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#NBVAL_SKIP\n",
    "gm.get_chembl_id_from_smiles(\"CC(=O)N(O)CCCCCNC(=O)CCC(=O)N(O)CCCCCNC(=O)CCC(=O)N(O)CCCCCN.CS(=O)(=O)O\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Constructing Graphs from ChEMBL"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAIAAADCEh9HAAAABmJLR0QA/wD/AP+gvaeTAAAc/UlEQVR4nO3deUAUZ7ou8IcGGmhQwAVUBAVEVIwaXOMSoqIZFM0y0ej1kow6B5IYSWYxmGhEReeg40JE4zBO9BiXuByNosbciFHciAooLiAoChJAEUR26e29fxR0CLI0FFLd8v7+0qZ5ebu6+qnv+6q72oSIwBhjrLlkUjfAGGPGjWOUMcZE4RhljDFROEYZY0wUjlHGGBOFY5QxxkThGGWMMVE4RhljTBSOUcYYE4VjlDHGROEYZYwxUThGGWNMFI5RxhgThWO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GnTHuQtOH1bopoXsMRDwFSpGnWm4M6O1DJWuO6Acl1B61kTpTZGj+OscJO96h29DKy1L0Oa8/ujYAjGKyBoEqJs+zYKa04UGHq3QqQXTdTJZqMTq4qcEAP48JqprArE+JTYM4+vPBOOHgaieJ4aM4aw3JyUywHLIgGhnsGlWatzZLyNVgRG8uszjTYfxA4GvM6t3w/G2fe2wQ0fbMWpbZsE8JoPr6YcItH3jFt/mDie8rlhUNASqo561LYOixAhkQgKytkk4xC+Wil6tF3ONpRwI3adoEEifShVcmGCiHYMVNc1J4ReS2pTVrKexXKxMo2LEx9tqprQRSNuSevfDkOzycyeOlvSp/7N5CnubXfOkR31318/wPWEK/EijjjDgAAAABJRU5ErkJggg==",
      "text/plain": [
       "<rdkit.Chem.rdchem.Mol at 0x7f417b250fa0>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#NBVAL_SKIP\n",
    "g = gm.construct_graph(chembl_id=\"CHEMBL1234\")\n",
    "g.graph[\"rdmol\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Retrieving Metadata from ChEMBL\n",
    "\n",
    "We can retrieve metadata from chembl both functionally and via the graph construction config."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'atc_classifications': [], 'availability_type': 1, 'biotherapeutic': None, 'black_box_warning': 0, 'chebi_par_id': 31460, 'chirality': 2, 'cross_references': [{'xref_id': 'deferoxamine%20mesylate', 'xref_name': 'deferoxamine mesylate', 'xref_src': 'DailyMed'}, {'xref_id': '11112937', 'xref_name': 'SID: 11112937', 'xref_src': 'PubChem'}, {'xref_id': '11533050', 'xref_name': 'SID: 11533050', 'xref_src': 'PubChem'}, {'xref_id': '124882730', 'xref_name': 'SID: 124882730', 'xref_src': 'PubChem'}, {'xref_id': '144204292', 'xref_name': 'SID: 144204292', 'xref_src': 'PubChem'}, {'xref_id': '170464752', 'xref_name': 'SID: 170464752', 'xref_src': 'PubChem'}, {'xref_id': '26747967', 'xref_name': 'SID: 26747967', 'xref_src': 'PubChem'}], 'dosed_ingredient': True, 'first_approval': 1968, 'first_in_class': 0, 'helm_notation': None, 'indication_class': 'Antidote (to iron poisoning); Chelating Agent', 'inorganic_flag': 0, 'max_phase': 4, 'molecule_chembl_id': 'CHEMBL1234', 'molecule_hierarchy': {'molecule_chembl_id': 'CHEMBL1234', 'parent_chembl_id': 'CHEMBL556'}, 'molecule_properties': {'alogp': '0.92', 'aromatic_rings': 0, 'cx_logd': '-3.64', 'cx_logp': '-3.37', 'cx_most_apka': '7.92', 'cx_most_bpka': '10.21', 'full_molformula': 'C26H52N6O11S', 'full_mwt': '656.80', 'hba': 9, 'hba_lipinski': 14, 'hbd': 6, 'hbd_lipinski': 7, 'heavy_atoms': 39, 'molecular_species': 'BASE', 'mw_freebase': '560.69', 'mw_monoisotopic': '560.3534', 'num_lipinski_ro5_violations': 3, 'num_ro5_violations': 2, 'psa': '205.84', 'qed_weighted': '0.06', 'ro3_pass': 'N', 'rtb': 23}, 'molecule_structures': {'canonical_smiles': 'CC(=O)N(O)CCCCCNC(=O)CCC(=O)N(O)CCCCCNC(=O)CCC(=O)N(O)CCCCCN.CS(=O)(=O)O', 'molfile': '\\n     RDKit          2D\\n\\n 44 42  0  0  0  0  0  0  0  0999 V2000\\n    8.4417    0.9708    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    0.5667    0.5208    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    7.7167   -4.3792    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   10.5792    0.5708    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    2.7042    0.9125    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    0.5667   -0.3250    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\\n    7.7167    0.5375    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\\n    8.4417   -3.9750    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\\n   -0.1583    0.9250    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n    8.4417    1.7833    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n    7.0125   -3.9750    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.1542    0.5500    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    1.2792    0.9250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    2.7042    1.7375    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n   11.3042    0.9833    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n   10.5792   -0.2542    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\\n    3.4292    0.5000    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\\n    2.0000    0.5000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.8750    0.9708    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.1667   -4.4250    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n    7.7167   -0.2875    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n    1.2792   -0.7250    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n   -1.5833   -4.0375    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\\n    7.7167   -5.2250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    7.0125    0.9583    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   -0.1583   -0.7375    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    8.4417   -3.1500    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    4.1417    0.9250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.8750   -0.6542    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   -1.5833   -3.2125    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    6.2917    0.5333    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   -0.1583   -1.5625    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.1542   -2.7292    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    4.8625    0.5208    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.8750   -1.4917    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   -0.8625   -2.8000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    5.5792    0.9375    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.1542   -1.9042    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   -0.8625   -1.9750    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   13.4750   -2.4292    0.0000 S   0  0  0  0  0  0  0  0  0  0  0  0\\n   13.0667   -1.7125    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n   13.8667   -3.1500    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n   14.1917   -2.0250    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n   12.7500   -2.8250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n  2 13  1  0\\n  3  8  1  0\\n  4 19  1  0\\n  5 17  1  0\\n  6  2  1  0\\n  7  1  1  0\\n  8 27  1  0\\n  9  2  2  0\\n 10  1  2  0\\n 11  3  2  0\\n 12  1  1  0\\n 13 18  1  0\\n 14  5  2  0\\n 15  4  2  0\\n 16  4  1  0\\n 17 28  1  0\\n 18  5  1  0\\n 19 12  1  0\\n 20  8  1  0\\n 21  7  1  0\\n 22  6  1  0\\n 23 30  1  0\\n 24  3  1  0\\n 25  7  1  0\\n 26  6  1  0\\n 27 33  1  0\\n 28 34  1  0\\n 29 16  1  0\\n 30 36  1  0\\n 31 25  1  0\\n 32 26  1  0\\n 33 38  1  0\\n 34 37  1  0\\n 35 29  1  0\\n 36 39  1  0\\n 37 31  1  0\\n 38 35  1  0\\n 39 32  1  0\\n 41 40  2  0\\n 42 40  2  0\\n 43 40  1  0\\n 44 40  1  0\\nM  END\\n\\n> <chembl_id>\\nCHEMBL1234\\n\\n> <chembl_pref_name>\\nDEFEROXAMINE MESYLATE\\n\\n', 'standard_inchi': 'InChI=1S/C25H48N6O8.CH4O3S/c1-21(32)29(37)18-9-3-6-16-27-22(33)12-14-25(36)31(39)20-10-4-7-17-28-23(34)11-13-24(35)30(38)19-8-2-5-15-26;1-5(2,3)4/h37-39H,2-20,26H2,1H3,(H,27,33)(H,28,34);1H3,(H,2,3,4)', 'standard_inchi_key': 'IDDIJAWJANBQLJ-UHFFFAOYSA-N'}, 'molecule_synonyms': [{'molecule_synonym': 'BA-33112', 'syn_type': 'RESEARCH_CODE', 'synonyms': 'BA-33112'}, {'molecule_synonym': 'Deferoxamine mesilate', 'syn_type': 'JAN', 'synonyms': 'DEFEROXAMINE MESILATE'}, {'molecule_synonym': 'Deferoxamine mesilate', 'syn_type': 'OTHER', 'synonyms': 'DEFEROXAMINE MESILATE'}, {'molecule_synonym': 'Deferoxamine mesylate', 'syn_type': 'FDA', 'synonyms': 'DEFEROXAMINE MESYLATE'}, {'molecule_synonym': 'Deferoxamine mesylate', 'syn_type': 'OTHER', 'synonyms': 'DEFEROXAMINE MESYLATE'}, {'molecule_synonym': 'Deferoxamine mesylate', 'syn_type': 'TRADE_NAME', 'synonyms': 'DEFEROXAMINE MESYLATE'}, {'molecule_synonym': 'Deferoxamine mesylate', 'syn_type': 'USAN', 'synonyms': 'DEFEROXAMINE MESYLATE'}, {'molecule_synonym': 'Deferoxamine mesylate', 'syn_type': 'USP', 'synonyms': 'DEFEROXAMINE MESYLATE'}, {'molecule_synonym': 'Deferoxamine methanesulfonate', 'syn_type': 'MERCK_INDEX', 'synonyms': 'DEFEROXAMINE METHANESULFONATE'}, {'molecule_synonym': 'Deferoxamini mesilas', 'syn_type': 'OTHER', 'synonyms': 'DEFEROXAMINI MESILAS'}, {'molecule_synonym': 'Desferal', 'syn_type': 'TRADE_NAME', 'synonyms': 'Desferal'}, {'molecule_synonym': 'Desferal Mesylate', 'syn_type': 'TRADE_NAME', 'synonyms': 'Desferal Mesylate'}, {'molecule_synonym': 'Desferrioxamine mesilate', 'syn_type': 'BAN', 'synonyms': 'DESFERRIOXAMINE MESILATE'}, {'molecule_synonym': 'Desferrioxamine mesilate', 'syn_type': 'BNF', 'synonyms': 'DESFERRIOXAMINE MESILATE'}, {'molecule_synonym': 'Desferrioxamine Mesylate', 'syn_type': 'TRADE_NAME', 'synonyms': 'Desferrioxamine Mesylate'}, {'molecule_synonym': 'Desferrioxamine mesylate', 'syn_type': 'OTHER', 'synonyms': 'DESFERRIOXAMINE MESYLATE'}, {'molecule_synonym': 'NSC-756718', 'syn_type': 'RESEARCH_CODE', 'synonyms': 'NSC-756718'}], 'molecule_type': 'Small molecule', 'natural_product': 0, 'oral': False, 'parenteral': True, 'polymer_flag': 0, 'pref_name': 'DEFEROXAMINE MESYLATE', 'prodrug': 0, 'structure_type': 'MOL', 'therapeutic_flag': True, 'topical': False, 'usan_stem': None, 'usan_stem_definition': None, 'usan_substem': None, 'usan_year': 1966, 'withdrawn_class': None, 'withdrawn_country': None, 'withdrawn_flag': False, 'withdrawn_reason': None, 'withdrawn_year': None}\n"
     ]
    }
   ],
   "source": [
    "#NBVAL_SKIP\n",
    "# Functionally\n",
    "\n",
    "g = gm.add_chembl_metadata(g)\n",
    "print(g.graph[\"chembl_metadata\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n",
      "\u001b[33mWARNING [bioservices:ChEMBL:119]: \u001b[0m \u001b[34mThe URL (https://www.ebi.ac.uk/chembl/api/data) provided cannot be reached.\u001b[0m\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'atc_classifications': [],\n",
       " 'availability_type': 1,\n",
       " 'biotherapeutic': None,\n",
       " 'black_box_warning': 0,\n",
       " 'chebi_par_id': 31460,\n",
       " 'chirality': 2,\n",
       " 'cross_references': [{'xref_id': 'deferoxamine%20mesylate',\n",
       "   'xref_name': 'deferoxamine mesylate',\n",
       "   'xref_src': 'DailyMed'},\n",
       "  {'xref_id': '11112937', 'xref_name': 'SID: 11112937', 'xref_src': 'PubChem'},\n",
       "  {'xref_id': '11533050', 'xref_name': 'SID: 11533050', 'xref_src': 'PubChem'},\n",
       "  {'xref_id': '124882730',\n",
       "   'xref_name': 'SID: 124882730',\n",
       "   'xref_src': 'PubChem'},\n",
       "  {'xref_id': '144204292',\n",
       "   'xref_name': 'SID: 144204292',\n",
       "   'xref_src': 'PubChem'},\n",
       "  {'xref_id': '170464752',\n",
       "   'xref_name': 'SID: 170464752',\n",
       "   'xref_src': 'PubChem'},\n",
       "  {'xref_id': '26747967',\n",
       "   'xref_name': 'SID: 26747967',\n",
       "   'xref_src': 'PubChem'}],\n",
       " 'dosed_ingredient': True,\n",
       " 'first_approval': 1968,\n",
       " 'first_in_class': 0,\n",
       " 'helm_notation': None,\n",
       " 'indication_class': 'Antidote (to iron poisoning); Chelating Agent',\n",
       " 'inorganic_flag': 0,\n",
       " 'max_phase': 4,\n",
       " 'molecule_chembl_id': 'CHEMBL1234',\n",
       " 'molecule_hierarchy': {'molecule_chembl_id': 'CHEMBL1234',\n",
       "  'parent_chembl_id': 'CHEMBL556'},\n",
       " 'molecule_properties': {'alogp': '0.92',\n",
       "  'aromatic_rings': 0,\n",
       "  'cx_logd': '-3.64',\n",
       "  'cx_logp': '-3.37',\n",
       "  'cx_most_apka': '7.92',\n",
       "  'cx_most_bpka': '10.21',\n",
       "  'full_molformula': 'C26H52N6O11S',\n",
       "  'full_mwt': '656.80',\n",
       "  'hba': 9,\n",
       "  'hba_lipinski': 14,\n",
       "  'hbd': 6,\n",
       "  'hbd_lipinski': 7,\n",
       "  'heavy_atoms': 39,\n",
       "  'molecular_species': 'BASE',\n",
       "  'mw_freebase': '560.69',\n",
       "  'mw_monoisotopic': '560.3534',\n",
       "  'num_lipinski_ro5_violations': 3,\n",
       "  'num_ro5_violations': 2,\n",
       "  'psa': '205.84',\n",
       "  'qed_weighted': '0.06',\n",
       "  'ro3_pass': 'N',\n",
       "  'rtb': 23},\n",
       " 'molecule_structures': {'canonical_smiles': 'CC(=O)N(O)CCCCCNC(=O)CCC(=O)N(O)CCCCCNC(=O)CCC(=O)N(O)CCCCCN.CS(=O)(=O)O',\n",
       "  'molfile': '\\n     RDKit          2D\\n\\n 44 42  0  0  0  0  0  0  0  0999 V2000\\n    8.4417    0.9708    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    0.5667    0.5208    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    7.7167   -4.3792    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   10.5792    0.5708    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    2.7042    0.9125    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    0.5667   -0.3250    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\\n    7.7167    0.5375    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\\n    8.4417   -3.9750    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\\n   -0.1583    0.9250    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n    8.4417    1.7833    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n    7.0125   -3.9750    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.1542    0.5500    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    1.2792    0.9250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    2.7042    1.7375    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n   11.3042    0.9833    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n   10.5792   -0.2542    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\\n    3.4292    0.5000    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\\n    2.0000    0.5000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.8750    0.9708    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.1667   -4.4250    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n    7.7167   -0.2875    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n    1.2792   -0.7250    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n   -1.5833   -4.0375    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\\n    7.7167   -5.2250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    7.0125    0.9583    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   -0.1583   -0.7375    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    8.4417   -3.1500    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    4.1417    0.9250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.8750   -0.6542    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   -1.5833   -3.2125    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    6.2917    0.5333    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   -0.1583   -1.5625    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.1542   -2.7292    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    4.8625    0.5208    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.8750   -1.4917    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   -0.8625   -2.8000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    5.5792    0.9375    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n    9.1542   -1.9042    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   -0.8625   -1.9750    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n   13.4750   -2.4292    0.0000 S   0  0  0  0  0  0  0  0  0  0  0  0\\n   13.0667   -1.7125    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n   13.8667   -3.1500    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n   14.1917   -2.0250    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\\n   12.7500   -2.8250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\\n  2 13  1  0\\n  3  8  1  0\\n  4 19  1  0\\n  5 17  1  0\\n  6  2  1  0\\n  7  1  1  0\\n  8 27  1  0\\n  9  2  2  0\\n 10  1  2  0\\n 11  3  2  0\\n 12  1  1  0\\n 13 18  1  0\\n 14  5  2  0\\n 15  4  2  0\\n 16  4  1  0\\n 17 28  1  0\\n 18  5  1  0\\n 19 12  1  0\\n 20  8  1  0\\n 21  7  1  0\\n 22  6  1  0\\n 23 30  1  0\\n 24  3  1  0\\n 25  7  1  0\\n 26  6  1  0\\n 27 33  1  0\\n 28 34  1  0\\n 29 16  1  0\\n 30 36  1  0\\n 31 25  1  0\\n 32 26  1  0\\n 33 38  1  0\\n 34 37  1  0\\n 35 29  1  0\\n 36 39  1  0\\n 37 31  1  0\\n 38 35  1  0\\n 39 32  1  0\\n 41 40  2  0\\n 42 40  2  0\\n 43 40  1  0\\n 44 40  1  0\\nM  END\\n\\n> <chembl_id>\\nCHEMBL1234\\n\\n> <chembl_pref_name>\\nDEFEROXAMINE MESYLATE\\n\\n',\n",
       "  'standard_inchi': 'InChI=1S/C25H48N6O8.CH4O3S/c1-21(32)29(37)18-9-3-6-16-27-22(33)12-14-25(36)31(39)20-10-4-7-17-28-23(34)11-13-24(35)30(38)19-8-2-5-15-26;1-5(2,3)4/h37-39H,2-20,26H2,1H3,(H,27,33)(H,28,34);1H3,(H,2,3,4)',\n",
       "  'standard_inchi_key': 'IDDIJAWJANBQLJ-UHFFFAOYSA-N'},\n",
       " 'molecule_synonyms': [{'molecule_synonym': 'BA-33112',\n",
       "   'syn_type': 'RESEARCH_CODE',\n",
       "   'synonyms': 'BA-33112'},\n",
       "  {'molecule_synonym': 'Deferoxamine mesilate',\n",
       "   'syn_type': 'JAN',\n",
       "   'synonyms': 'DEFEROXAMINE MESILATE'},\n",
       "  {'molecule_synonym': 'Deferoxamine mesilate',\n",
       "   'syn_type': 'OTHER',\n",
       "   'synonyms': 'DEFEROXAMINE MESILATE'},\n",
       "  {'molecule_synonym': 'Deferoxamine mesylate',\n",
       "   'syn_type': 'FDA',\n",
       "   'synonyms': 'DEFEROXAMINE MESYLATE'},\n",
       "  {'molecule_synonym': 'Deferoxamine mesylate',\n",
       "   'syn_type': 'OTHER',\n",
       "   'synonyms': 'DEFEROXAMINE MESYLATE'},\n",
       "  {'molecule_synonym': 'Deferoxamine mesylate',\n",
       "   'syn_type': 'TRADE_NAME',\n",
       "   'synonyms': 'DEFEROXAMINE MESYLATE'},\n",
       "  {'molecule_synonym': 'Deferoxamine mesylate',\n",
       "   'syn_type': 'USAN',\n",
       "   'synonyms': 'DEFEROXAMINE MESYLATE'},\n",
       "  {'molecule_synonym': 'Deferoxamine mesylate',\n",
       "   'syn_type': 'USP',\n",
       "   'synonyms': 'DEFEROXAMINE MESYLATE'},\n",
       "  {'molecule_synonym': 'Deferoxamine methanesulfonate',\n",
       "   'syn_type': 'MERCK_INDEX',\n",
       "   'synonyms': 'DEFEROXAMINE METHANESULFONATE'},\n",
       "  {'molecule_synonym': 'Deferoxamini mesilas',\n",
       "   'syn_type': 'OTHER',\n",
       "   'synonyms': 'DEFEROXAMINI MESILAS'},\n",
       "  {'molecule_synonym': 'Desferal',\n",
       "   'syn_type': 'TRADE_NAME',\n",
       "   'synonyms': 'Desferal'},\n",
       "  {'molecule_synonym': 'Desferal Mesylate',\n",
       "   'syn_type': 'TRADE_NAME',\n",
       "   'synonyms': 'Desferal Mesylate'},\n",
       "  {'molecule_synonym': 'Desferrioxamine mesilate',\n",
       "   'syn_type': 'BAN',\n",
       "   'synonyms': 'DESFERRIOXAMINE MESILATE'},\n",
       "  {'molecule_synonym': 'Desferrioxamine mesilate',\n",
       "   'syn_type': 'BNF',\n",
       "   'synonyms': 'DESFERRIOXAMINE MESILATE'},\n",
       "  {'molecule_synonym': 'Desferrioxamine Mesylate',\n",
       "   'syn_type': 'TRADE_NAME',\n",
       "   'synonyms': 'Desferrioxamine Mesylate'},\n",
       "  {'molecule_synonym': 'Desferrioxamine mesylate',\n",
       "   'syn_type': 'OTHER',\n",
       "   'synonyms': 'DESFERRIOXAMINE MESYLATE'},\n",
       "  {'molecule_synonym': 'NSC-756718',\n",
       "   'syn_type': 'RESEARCH_CODE',\n",
       "   'synonyms': 'NSC-756718'}],\n",
       " 'molecule_type': 'Small molecule',\n",
       " 'natural_product': 0,\n",
       " 'oral': False,\n",
       " 'parenteral': True,\n",
       " 'polymer_flag': 0,\n",
       " 'pref_name': 'DEFEROXAMINE MESYLATE',\n",
       " 'prodrug': 0,\n",
       " 'structure_type': 'MOL',\n",
       " 'therapeutic_flag': True,\n",
       " 'topical': False,\n",
       " 'usan_stem': None,\n",
       " 'usan_stem_definition': None,\n",
       " 'usan_substem': None,\n",
       " 'usan_year': 1966,\n",
       " 'withdrawn_class': None,\n",
       " 'withdrawn_country': None,\n",
       " 'withdrawn_flag': False,\n",
       " 'withdrawn_reason': None,\n",
       " 'withdrawn_year': None}"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Via Config\n",
    "config = gm.MoleculeGraphConfig(graph_metadata_functions=[gm.add_chembl_metadata])\n",
    "g = gm.construct_graph(chembl_id=\"CHEMBL1234\", config=config)\n",
    "g.graph[\"chembl_metadata\"]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.8.12 ('graphein-wip')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.13"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "2084dd4fc0c9f9186ef9bb5d9f5c6652432726a285d6ac2dcf2b1a616ab39cbb"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
